package onlinebanking.client.gui;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.WindowConstants;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class HeaderPanel extends javax.swing.JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JLabel headerLabel;
	private LoginPanel loginPanel;

	/**
	* Auto-generated main method to display this 
	* JPanel inside a new JFrame.s
	*/
	public static void main(String[] args) {
		JFrame frame = new JFrame();
		frame.getContentPane().add(new HeaderPanel());
		frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		frame.pack();
		frame.setVisible(true);
	}
	
	public HeaderPanel() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			this.setBackground(new java.awt.Color(190,255,174));
			this.setLayout(null);
			this.setBounds(10, 11, 772, 55);
			{
				headerLabel = new JLabel();
				this.add(headerLabel);
				headerLabel.setText("PDF BANK");
				headerLabel.setFont(new java.awt.Font("Arial Black",0,48));
				headerLabel.setEnabled(false);
				headerLabel.setForeground(new java.awt.Color(100,150,100));
				headerLabel.setBounds(0, 0, 275, 50);
			}
			{
				loginPanel = new LoginPanel();
				this.add(loginPanel);
				loginPanel.setBackground(new java.awt.Color(190,255,174));
				loginPanel.setLayout(null);
				loginPanel.setBounds(300, 15, 472, 40);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	protected void paintComponent(Graphics g) {
		super.paintComponent(g);
		
		Image background = null;
		try {
			background = Toolkit.getDefaultToolkit().getImage(getClass().getClassLoader().getResource("images/client/HeaderPanel.png"));
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		if(background != null) {
			g.drawImage(background, 0, 0, this);
		}
	}

}
